<div class="categories index">
	<h1>
		<?php __('Categories');?>
		<?php echo $this->Html->link($this->Html->image('assets/icons/dashboard/95.png', array('alt' => 'Edit')),
										'/admin/'.$this->params['controller']. '/' .'add',  
										array('escape' => false, 'class'=>'tooltip table_icon', 'title' => __('Add New Categories',true), 'rel' => 'add'));
		?>
	</h1>
	<p><?php __('Edit, View and Delete CMS categories.'); ?></p>
	<table class="normal">
	<thead>
		<tr>
				<th><?php __('Name');?></th>
				<th><?php __('Alias');?></th>
				<th><?php __('Description');?></th>
				<th class="actions"><?php __('Actions');?></th>
		</tr>
	</thead>
	<tbody>
		<?php
		$i = 0;
		foreach ($categories as $category):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?> id="row<?php echo $category['Category']['id']; ?>">
			<td><?php echo $category['Category']['name']; ?>&nbsp;</td>
			<td><?php echo $category['Category']['alias']; ?>&nbsp;</td>
			<td><?php echo $category['Category']['description']; ?>&nbsp;</td>
			<td class="actions">
				<?php echo $this->Html->link($this->Html->image('assets/icons/actions_small/Pencil.png', array('alt' => 'Edit')),
												'/admin/'.$this->params['controller']. '/' .'add'.'/'.$category['Category']['id'],  
												array('rel' => 'edit', 'escape' => false, 'class'=>'tooltip table_icon'));
				?>
				<?php echo $this->Html->link($this->Html->image('assets/icons/actions_small/Trash.png', array('alt' => 'Delete')),
												'/admin/'.$this->params['controller']. '/' .'delete'.'/'.$category['Category']['id'],  
												array('rel' => 'delete', 'escape' => false, 'class'=>'tooltip table_icon'));
				?>
			</td>
		</tr>
<?php endforeach; ?>
</tbody>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>